#ifndef __HANDLER_CG_SYNC_H__
#define __HANDLER_CG_SYNC_H__

#pragma once

#include <PacketStruct.h>

class ServerSession;

class Handler_CG_SYNC
{
public:
	Handler_CG_SYNC();
	~Handler_CG_SYNC();

	static RC::eSYNC_RESULT MoveCommon( Player * pPlayer, BYTE byState, WzVector &wvCurPos, WzVector &wvDestPos, BYTE byNumRoute, TILEINDEX* piRoute);
	static RC::eSYNC_RESULT KBMoveCommon( Player * pPlayer, WzVector &wvCurPos );
	static VOID CalcFinalDir( WzVector &vFinalDir, WORD wAngle, BOOL bFastMove, BYTE byMoveState );
	static VOID SendMoveNakMsg( Player * pPlayer, RC::eSYNC_RESULT eErrorCode );

	static VOID OnAG_SYNC_PLAYER_ENTER_SYN( ServerSession * pServerSession, MSG_BASE * pMsg, WORD wSize );
	static VOID OnAG_SYNC_PLAYER_WARP_SYN( ServerSession * pServerSession, MSG_BASE * pMsg, WORD wSize );

	static VOID OnCG_SYNC_MOVE_SYN( ServerSession * pServerSession, MSG_BASE * pMsg, WORD wSize );
	static VOID OnCG_SYNC_TARGET_MOVE_SYN( ServerSession * pServerSession, MSG_BASE * pMsg, WORD wSize );
	static VOID OnCG_SYNC_KBMOVE_SYN( ServerSession * pServerSession, MSG_BASE * pMsg, WORD wSize );
	static VOID OnCG_SYNC_STOP_SYN( ServerSession * pServerSession, MSG_BASE * pMsg, WORD wSize );
	static VOID OnCG_SYNC_FAST_KBMOVE_SYN( ServerSession * pServerSession, MSG_BASE * pMsg, WORD wSize );
};

#endif // __HANDLER_CG_SYNC_H__